<template>
  <div>
        <li v-for="(item, index) in ds"
  v-bind:item="item"
  v-bind:index="index"
  v-bind:key="item.id">
   {{item.nop}}
   {{item.d1}}
   {{item.d2}}
        </li>   
              
  </div>
</template>
<script>
// {{this.$route.query.nop}}
import axios from 'axios'
import {
    dom,
    event,
    openURL,
    QLayout,
    QToolbar,
    QToolbarTitle,
    QBtn,
    QInput,
    QIcon,
    QList,
    QListHeader,
    QItem,
    QItemSide,
    QItemMain,
    QCollapsible,
    QTransition,
    QSideLink,
    Dialog
  } from 'quasar'
  import {
    mavonEditor
  } from 'mavon-editor'
  export default {
    components: {
      QLayout,
      QToolbar,
      QToolbarTitle,
      QBtn,
      QInput,
      QIcon,
      QList,
      QListHeader,
      QItem,
      QItemSide,
      QItemMain,
      QCollapsible,
      QTransition,
      mavonEditor,
      QSideLink
    },
    data() {
      return {
        ID:0,
        Nop:this.$route.query.nop
      }
    },
    methods:{
      loadds() {
            var self = this
             console.log('1');
            //var NOP = this.$route.query.nop
            axios.post('/lstnum', {
                id: this.ID,
                nop: this.Nop
            })
                .then(function (response) {
                    var rt = response.data
                    console.log('2');
                    console.log(rt.ds);
                    if (rt.success) {
                        self.total = rt.total
                        for (var i = 0; i < rt.ds.length; i++) {
                            rt.ds[i].selected = false
                        }
                        self.ds = rt.ds
                        self.$refs.table.unSelectAll()
                    } else {
                        self.$toast.error({
                            title: '出错了',
                            message: rt.rt
                        })
                    }
                })
                .catch(function (error) {
                    self.$toast.error({
                        title: '出错了',
                        message: '出现未知错误!'
                    })
                })
        }
    },
    mounted: function () {
        this.loadds()
        this.height = 250
    }
  }
</script>